#ifndef SWP_SIM_SWIMLANE_GRAPHIC_ITEM_H
#define SWP_SIM_SWIMLANE_GRAPHIC_ITEM_H

#include "isimitem.h"
#include "swpswimlanegraphicitem.h"

#include <ellipsegraphicitem.h>
#include <pathgraphicitem.h>

namespace swp {

class SwpSimSwimlaneGraphicItem : public SwpSwimlaneGraphicItem,
    public ISimItem
{
public:
    SwpSimSwimlaneGraphicItem(QGraphicsItem* parent = 0);
    SwpSimSwimlaneGraphicItem(SwpSwimlaneGraphicItem* from,
        QGraphicsItem* parent = 0);
    ~SwpSimSwimlaneGraphicItem();

    // IEditorItem
    bool supportsConnection(
            const core::ConnectionData& connection) const;

    int type() const;

    IEditorItem* copy() const;

    // ISimItem
    bool isInSimPath() const;
    void setInSimPath(bool in = true);
    QUuid originId() const;

    // IPropertyObject
    QList<core::Property> properties() const;

    QVariant propertyValue(const QString& propertyName) const;

    void propertyChanged(const QString& property,
        const QVariant& newValue, bool silent = false);

    QVariantList optionList(const QString& propertyName) const;
    QVariantList autocomplete(const QString& propertyName) const;

protected:
    void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);

private:
    bool m_isInSimPath;
    QUuid m_originId;
};

} // namespace swp

#endif
